(L-class Gump (L-object)
  (L-method 'run (times)
    (unless (>= 0 times)
      (format t "Run!")
      (self 'run (- times 1)))))

(Gump 'run 3)


(let ((extend-method
        (L-method 'extend (&rest new-methods)
          (dolist (method new-methods)
            (setf (cdr slots/methods)
              (cons (car slots/methods) (cdr slots/methods)))
            (setf (car slots/methods) method))
          self)))
  (L-class Extendable (L-object)
    (L-method 'new (&rest new-methods)
      (apply next (cons 'new (append new-methods (list extend-method)))))
    extend-method))

(L-class Robot (Extendable))

(Robot 'extend
  (L-method 'speak-in-robot-voice (words)
    (format t "~S ~S" "(In robot voice)" words)))

(Robot 'speak-in-robot-voice "Wassup!") ; This should work

(Extendable 'speak-in-robot-voice "This should fail.")

(Robot 'inherits-from #'Extendable)
(Extendable 'inherits-from #'Robot)
